/**
 * 
 */
package anyware.desktop;

import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;

import anyware.desktop.model.FileItem;

/**
 * @author keke
 * @version 0.1
 */
public interface DesktopService {

    void addSyncRoot(File root) throws IOException;

    Collection<File> getSyncRoots() throws IOException;

    Collection<FileItem> getToBeIndexedItems();

    void removeSyncRoot(File root) throws IOException;

    void saveItem(FileItem item);

    Iterator<FileItem> search(String query, int start, int size)
            throws IOException, DesktopException;

    FileItem syncFile(File file);

}
